1. The Field of the Invention
The present invention relates to the management of system resources. More specifically, the present invention relates to serializing access to system resources by allowing system resources to be locked.
2. The Prior State of the Art
A significant advantage of computer networks is that a user can remotely access a document, an image, a printer, or other resource. Computer networks, and the internet in particular, have rendered the geographical location of the user irrelevant. The internet contains a vast amount of resources that are available to practically anyone with an internet connection. In a similar manner, local area networks, such as those used by businesses, can make documents, applications, printers, and other resources available to anyone connected to the local area network.
This ability to remotely access a resource has greatly enhanced the ability of people and businesses to work together more quickly and efficiently. This is especially true of a resource that is collaboratively produced. Before the advent of the internet and the prolific use of email, a resource, such as a document, that was produced by a group of authors required a significant amount of time and effort to produce. One reason for this delay is that updates and revisions to the document had to be circulated using regular mail systems. Keeping track of the most current edition of the document was also difficult because all the authors had different copies and were simultaneously making updates and revisions to potentially different revisions of the document.
Currently, email is the method of choice when persons collaborate on a document. Email has significantly reduced the time required to produce a collaborative document, but it is still difficult to keep track of the most current update. When authors are sending a document back and forth via email, each author can acquire multiple copies of a document on their computer. Each copy or revision of the document will most likely have a similar name and updated revisions emailed from various authors may arrive at different times. Because the names of revisions are similar, it is possible for the revision of one author to overwrite the revision of another author. This can require the changes and edits to be entered on yet another document. If the document is large, email can present additional problems which are related to the size of the document, especially when the network is busy. Encoding problems can also prevent a document from being successfully emailed. This is especially true when privacy is a concern.
This problem is rot limited to documents but can apply to a variety of different computer resources. The Internet, for example, is primarily a retrieve and read medium. A web page is downloaded to a local computer and read. For that reason, a web page being designed by several persons presents similar challenges. When a web page designer accesses a web page to make an update, the web page is downloaded to a local computer to be edited by that designer. The original web page, however, is still accessible by other designers. If another designer simultaneously decides to update the same web page, the second designer will download the web page and make changes. The problem is that the designers are not aware of each other or the changes being made. The result of this scenario is that one of the designer""s changes will be overwritten when the other designer uploads an update to the web page.
Using today""s technology, more and more of the work done by people and businesses is being done collaboratively. People work together in groups to create presentations, budgets, Advertisements, business plans, web sites and more. The global nature of he internet permits collaborative groups to be dispersed geographically and existing technology simply does not permit these groups of people to easily collaborate while producing a product. There is a need for protecting the work product of a group of people such that one person""s work isn""t inadvertently destroyed or overwritten. More generally, there is a clear need for a technology that permits remote users and groups of users to more effectively use and monitor computer resources. One effect of such technology would be that documents could no longer be inadvertently overwritten.
In response to these and other problems, the present invention provides systems and methods for serializing access to computer resources. Serialized access is achieved by allowing remote clients to place locks on computer resources. A lock can be a read lock, a write lock or any other type of lock desired by the remote user and supported by the system. The lock is granted for a specific amount of time, which may be refreshed each time the resource is accessed within the amount of time allotted for the lock. The lock is also enforced against local users and clients by passing a resource handle to the remote client when the lock to the resource is granted.
When a remote client or user locks a resource, a lock token is generated. The lock token is given to the remote client and is also stored in the memory of the system being accessed by the remote client. When the remote client attempts to access the resource at a later time, the system responds that the resource is locked. The remote client presents a lock token that must match the lock token stored in memory for that resource before access is granted. As an additional security measure, the identity of the remote user is authenticated when the remote user accesses the system. A security token is generated which is remembered by the system and associated with the lock token stored in memory. In order to access the locked resource, both the lock tokens and the security tokens must match. The reason for employing security tokens is because the list of lock tokens stored in the system memory is discoverable by other remote users. In this manner, system resources can be locked and accessed.
The locks expire or terminate in at least two different methods. First, a lock is removed from memory when a remote user attempts to access a locked resource and the system discovers that the resource has timed out. In this case, the remote user is denied access, the lock token is removed from memory, and the resource handle is released. Second, an idle thread of the system periodically cycles through the lock tokens stored in memory to determine if they have expired. Those that have expired are removed from memory and the associated resource handles are released.
Particular user agents have certain issues related to locks. For some user agents, a fixed lock token is generated and given to that user agent. A fixed lock token is always recognized as valid and access to the resource is granted even though the resource is not actually locked. If the resource is locked by another user agent when a fixed lock is presented, access is denied. In another case, the timeout period granted to some user agents is extended to account for real time latencies that may exist when the user agent attempts to refresh the timeout period near its expiration point.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. These and other objects and features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.